<html>

<head>
    <title>Ghost failed to load</title>
    <style>
        body {
            display: flex;
            justify-content: center;
            align-items: center;
            font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Open Sans","Helvetica Neue",sans-serif;
        }

        .error {
            text-align: center;
        }
    </style>
</head>

<body>
    <div class="error">
        <p>&#x1F626</p>
        <p>Loading the Ghost blog failed.</p>
        <small id="details">No error details.</small>
    </div>
    <script>
        var query = location.search.substr(1);
        var result = {};

        query.split("&").forEach((part) => {
            var item = part.split("=");
            result[item[0]] = decodeURIComponent(item[1]);
        });

        if (result && result.error) {
            var errorElement = document.getElementById('details');
            errorElement.textContent = result.error;
        }
    </script>
</body>

</html>
